package com.example.administrator.testc.TestDialog;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import pri.zey.custom.tools.Tdialog;
import pri.zey.custom.tools.TL;

/**
 * Created by Administrator on 2016/4/12 0012.
 */
public class TestMain extends Activity {

    private Tdialog td;
    private TL tl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        tl = new TL(this);
        td = Tdialog.getInstance(this);
        Button bt = new Button(this);
        setContentView(bt);
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                td.show();
                new Thread(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            tl.e("************************s");
                            Thread.sleep(3000);
                            tl.e("************************e");
                            td.close();
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }).start();
            }
        });
    }

    @Override
    protected void onStart() {
        super.onStart();
    }
}
